/*
Copyright (C) 2009  Raymond Jeon
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/


#ifndef __GL_MAIL_LOG_H__
#define __GL_MAIL_LOG_H__


#include "gl_lib_lock.h"


#define LOG_SMTP	"smtp"
#define LOG_POP3	"pop3"
#define LOG_SMMP	"smmp"
#define LOG_MTA		"mta"
#define LOG_SYSTEM	"system"

#define LOG_MAIL	"mail"

#define LOG_SPAM	"spam"


void GlMailLogInit();
void GlMailLog(char *service, unsigned int verbose, glmutex_ *mtLog, char *szFormat, va_list args);

void GlLogSmtp(unsigned int verbose, char *szFormat, ...);
void GlLogPop3(unsigned int verbose, char *szFormat, ...);
void GlLogSmmp(unsigned int verbose, char *szFormat, ...);
void GlLogMta(unsigned int verbose, char *szFormat, ...);
void GlLogSystem(unsigned int verbose, char *szFormat, ...);
void GlLogAll(unsigned int verbose, char *szFormat, ...);
void GlLogSpam(char *szFormat, ...);



void GlCleanExpiredLog(char *szDir, unsigned int uiLogExpire);





#endif	// __GL_MAIL_LOG_H__



